/**
  * @Time: 2017-12-15
  * @Author: Carl
  * @For: “页面常用样�
  */

/* @module base */
  // Theme color
 $light_green: #51ab81;
       $green: #44916C;
  $dark_green: #367355;
    $bg_green: #ebf0ed;
  // Default Theme Color
  $light_blue: #66b1ff;
        $blue: #409eff;
   $dark_blue: #3a8ee6;
  // Font Color
        $dark: #333333;
        $gray: #666666;
       $light: #999999;
  // Font Size
       $large: 18px;
        $main: 16px;
        $base: 14px;
       $small: 12px;
  // Others
    $bg_color: #f7fafc;
$border_color: #e0e0e0;
/* @End base */

/* @module My Reset */ 
::-webkit-scrollbar {
  width: 0;
}
ul,ol,dl,p{
  margin: 0;
  padding: 0;
}
h1,h2,h3,h4,h5,h6{
  margin: 0;
}
.db{
  display: block;
  width: 100%!important;
}
.gap{
  display: block;
  width: 100%;
  height: 10px;
  clear: both;
}
/* @End My Reset */ 

/* @module Navigator */
.nav-wrapper{
  position: absolute;
  top: 80px;
  left: 0;
  bottom: 0;
  box-sizing: border-box;
  width: 240px;
  border-right: solid 1px $border_color;
  overflow-y: auto;
  box-shadow: 0px -3px 7px 0px rgba(191, 203, 216, 0.35);
  transition: all 0.2s;
  &.is-collapse{
    width: 80px;
    .el-menu{
      width: 100%;
      border-right: 0;
      .el-submenu__title{
        text-align: center;
      }
    }
  }
  .el-menu{
    border: none;
    transition: all 0ms;
    .el-menu-item:hover,
    .el-menu-item.is-active{
      color: $dark_green;
      background: $bg_green;
    }
    .el-submenu__title:hover{
      background: transparent;
    }
    .el-submenu.is-opened{
      .el-submenu__title{
        color: $green;
        background: transparent;
        .iconfont{
          color: $green;
        }
      }
    }
  }
}
/* @End Navigator */

/* @Module Main */
.main-wrapper{
  position: absolute;
  top: 80px;
  left: 240px;
  right: 0;
  bottom: 0;
  padding: 20px;
  background: $bg_color;
  overflow: auto;
  transition: all 0.2s;
  &.is-collapse{
    left: 80px;
  }
  .main{
    height: 100%;
    .main-title{
      position: relative;
      margin-bottom: 20px;
      padding: 11px 0 11px 10px;
      line-height: 16px;
      color: $dark;
      font-size: 16px;
      font-weight: normal;
      border-bottom: 2px solid $border_color;
      &::after{
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        width: 2px;
        height: 16px;
        margin-top: -8px;
        background: $light_green;
      }
    }
    .main-sub-title{
      height: 25px;
      line-height: 25px;
      margin-bottom: 20px;
      color: #fff;
      border-bottom: 1px solid #ebeff2;
      span{
        display: inline-block;
        height: 25px;
        font-size: 14px;
        padding: 0 8px;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
        background: #ccc;
      }
    }
    .main-contain{
      position: relative;
      height: calc(100% - 60px);
      .tree-wrapper{
        position: absolute;
        top: 0;
        bottom: 20px;
        left: 0;
        width: 240px;
        background: #fff;
        overflow-x: hidden;
        overflow-y: auto;
        & + .content-wrapper{
          margin-left: 260px;
        }
      }
      .content-wrapper{
        height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
      }
    }
  }
}
/* @End Main */

/* @Module Public */
.input-width {
  width: 240px;
}
  // Tools Wrapper
.tools-wrapper{
  margin-bottom: 10px;
  font-size: 0;
  &.footer{
    margin: 20px 0 20px 130px;
  }
  .search-bar{
    display: inline-block;
    margin-right: 10px;
    width: 300px;
    .el-input__inner{
      border-color: $green;
    }
    .el-input-group__append{
      padding: 0 14px;
      border-color: $green;
      background-color: $green;
      .el-icon-search{
        color: #fff;
      }
      &:active,
      &:focus{
        background-color: $dark_green;
      }
    }
  }
  .el-switch{
    float: right;
    margin-top: 10px;
  }
}
  // Info Wrapper
.info-wrapper{
  margin-bottom: 10px;
  height: 40px;
  font-size: 0;
  .info-item{
    position: relative;
    display: inline-block;
    padding-right: 30px;
    line-height: 40px;
    font-size: $base;
    color: $gray;
    cursor: pointer;
    .operation-bar{
      display: none;
    }
    &.has-child{
      padding-right: 80px;
      .operation-bar{
        position: absolute;
        top: 0;
        left: calc(100% - 80px);
        padding-left: 10px;
      }
      &:hover .operation-bar{
        display: block;
      }
    }
  }
}
/* @End Public */

/* @module Reset Element Button */
.el-button{
  font-weight: normal;
  & + .el-button{
    margin-left: 10px;
  }
}
/* @End Reset Element Button */

/* @Module Reset Element Tree */
.company-name{
  padding-left: 18px;
  line-height: 40px;
  height: 40px;
  font-size: $base;
  color: $dark;
  font-weight: normal;
  cursor: pointer;
}
.el-tree{
  color: $gray;
  .el-tree-node__content{
    height: 40px;
    .el-tree-node__label{
      font-size: $base;
    }
  }
  .el-tree-node:focus>.el-tree-node__content,
  .el-tree-node__content:hover{
    background: $bg_green;
    .el-tree-node__label{
      color: $green;
    }
  }
}
/* @End Reset Element Tree */


/* @Module Reset Element Table */
.el-table{
  th,
  td{
    padding: 0;
    height: 40px;
    color: $gray;
  }
  th{
    height: 45px;
    color: #707580;
    font-weight: normal;
    background: #f0f4f7;
  }
}
.el-pagination{
  margin-top: 20px;
}
/* @End Reset Element Table */

/* @Module Reset Element Dialog */
.el-dialog__wrapper{
  .el-dialog{
    width: 425px;
  }
  &.form-dialog .el-dialog{
    width: 50%;
  }
  .el-select{
    display: block;
  }
}
/* @End Reset Element Dialog */

/* @Module Reset Element uploader */
.uploader-wrapper{
  margin: 0 20px 0 120px;
  .pic{
    display: block;
    margin: 10px 0;
    display: block;
    width: 240px;
    height: 240px;
  }
}
.avatar-uploader{
  margin: auto;
  .el-upload{
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    &:hover{
      border-color: #409EFF;
    }
  }
  .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 240px;
    height: 240px;
    line-height: 240px;
    text-align: center;
  }
  .avatar {
    width: 240px;
    height: 240px;
    display: block;
  }
}
.mini-uploader{
  margin: auto;
  line-height: 0;
  .el-upload{
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    &:hover{
      border-color: #409EFF;
    }
  }
  .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 60px;
    height: 60px;
    line-height: 60px;
    text-align: center;
  }
  .avatar {
    width: 60px;
    height: 60px;
    display: block;
  }
}
.drag-uploader{
  margin-bottom: 20px;
  .el-upload-dragger{
    width: 480px;
    height: 220px;
    p{
      margin: 0 60px;
      text-align: left;
      font-size: $small;
      color: $light;
      &:first-of-type {
        margin-top: 10px;
      }
      em{
        font-style: normal;
        padding: 0 4px;
        color: $blue;
      }
    }
  }
  .el-upload-list{
    width: 480px;
  }
}
/* @End Reset Element uploader */

/* @Moudule Tips */
.tip-pic{
  display: block;
  max-width: 240px;
  max-height: 240px;
}
.mini-pic{
  vertical-align: middle;
}
/* @End Tips */

.flex-box{
  display: flex;
  align-items: center;
  font-size: $base;
  .el-input,
  .el-select,
  .el-input-number,
  .el-form-item{
    flex: 1;
  }
  .line{
    width: 20px;
    text-align: center;
  }
  .mark{
    padding: 0 10px;
  }
}

/* @table row background */
.el-table tr.warning-row {
  background: #e4e4e4;
}
.el-table tr.success-row {
  background-color: #f0f9eb;
}

/* 单张图片上传组件 */
.uploader-bar{
  font-size: 0;
  .single-uploader{
    display: inline-block;
    vertical-align: top;
    line-height: 0;
    margin-right: 20px;
    .el-upload{
      position: relative;
      box-sizing: border-box;
      width: 150px;
      height: 150px;
      border: dashed 1px #ddd;
      border-radius: 6px;
      .el-icon-plus{
        font-size: 28px;
        color: #666;
        line-height: 146px;
      }
      .uploader-img{
        display: block;
        position: relative;
        width: 148px;
        height: 148px;
        & > img {
          position: absolute;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
          max-width: 100%;
          max-height: 100%;
          outline: none;
        }
      }
      .btn-delete {
        position: absolute;
        top: -14px;
        right: -14px;
        font-size: 28px;
        color: #aaa;
      }
    }
    .uploader-tip{
      height: 30px;
      line-height: 30px;
      font-size: 14px;
      color: #000;
      text-align: center;
    }
  }
}
.perview-img{
  padding: 20px 0;
  & > img{
    width: 100%;
    max-width: 400px;
  }
}
